package junior.db.dao.enums;

/**
 * @author wubo
 * @date 2024/8/30 14:26
 */
public enum LikeMode {
    NONE,
    All,
    Prefix,
    Suffix;
    
    public String wrap(Object value) {
        switch (this) {
            case All: return "%" + value + "%";
            case Prefix: return value + "%";
            case Suffix: return "%" + value;
            default: return value.toString();
        }
    }
}
